import request from "@/util/request";
// 上传背景图片
export const uploadBgApi = ({ file }) => {
  const formData = new FormData();
  formData.append("bg", file);
  // ... 略，formData 其他实现逻辑
  return request({
    url: "/user/uploadImage/bg",
    method: "POST",
    data: formData,
    headers: {
      "Content-type": "multipart/form-data",
    },
  });
};
// 上传头像
export const uploadAvatarApi = ({ file }) => {
  const formData = new FormData();
  formData.append("avatar", file);
  // ... 略，formData 其他实现逻辑
  return request({
    url: "/user/uploadImage/avatar",
    method: "POST",
    data: formData,
    headers: {
      "Content-type": "multipart/form-data",
    },
  });
};

